# Maintainer: Morten Linderud <foxboron@archlinux.org>
# Maintainer: Bruno Pagani <archange@archlinux.org>

_pkg=Type-Tiny
pkgname=perl-${_pkg,,}
pkgver=1.016010
pkgrel=2
pkgdesc="Tiny, yet Moo(se)-compatible type constraint"
arch=(any)
url="https://metacpan.org/release/${_pkg}"
license=(PerlArtistic GPL)
options=(!emptydirs)
depends=(perl perl-exporter-tiny)
checkdepends=(perl-test-simple)
source=(https://cpan.metacpan.org/authors/id/T/TO/TOBYINK/${_pkg}-${pkgver}.tar.gz)
sha512sums=('49134351dfaa18b69a6bb8fa375fe35fbbaff12b2ac4f6c80fa93fbedbce9e15930a598dde4a27b7eb23d7681d27ebb2487fa7e771bc86a22ad7d90e8b23e686')

build() {
    cd ${_pkg}-${pkgver}
    export PERL_MM_USE_DEFAULT=1 PERL_AUTOINSTALL=--skipdeps
    perl Makefile.PL
    make
}

check() {
    cd ${_pkg}-${pkgver}
    make test
}

package() {
    cd ${_pkg}-${pkgver}
    make INSTALLDIRS=vendor DESTDIR="${pkgdir}" install
}
